package com.joysuch.wwyt.bp.service.impl;

import com.joysuch.wwyt.bp.repository.BPInspectPointDetailRepository;
import com.joysuch.wwyt.bp.repository.BPInspectPointRepository;
import com.joysuch.wwyt.bp.service.BPInspectPointDetailService;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import javax.transaction.Transactional;

/**
 * 巡检： 巡检点关联设备列表Service
 */

@Slf4j
@Service
@Transactional
@RequiredArgsConstructor(onConstructor = @__(@Autowired))
public class BPInspectPointDetailServiceImpl implements BPInspectPointDetailService {

    @Autowired
    private BPInspectPointDetailRepository inspectPointDetailDao;


    @Override
    public void deleteById(Long id) {
        inspectPointDetailDao.deleteById(id);
    }

    @Override
    public void deleteByInspectPointId(Long inspectPointId) {
        inspectPointDetailDao.deleteBPInspectPointDetailByInspectPointId(inspectPointId);
    }
}
